<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    {{num}}
    <button @click="increment">+</button>
    <button @click="decrement">-</button>
</div>
<script type="text/javascript">
    var app = new Vue({
        el: "#app",
        data: {
            num: 0,
        },
        created() {
            console.log("created hook")
        },
        methods: {
            decrement() {
                this.num--;
            },
            increment() {
                this.num++;
            },
            //hook
            created() {
                console.log("created hook")
            }
        }
    });
</script>
</body>
</html>